<template>
	<view class="historyContent">
		<view class="headBox">
			<view class="img">
				<image class="logo" src="/static/logo.png"></image>
			</view>
			<view class="messageBox">
				<view class="item">
					<u-row
						justify="space-between"
						customStyle="width: 95%;margin:0 auto 20rpx auto;"
						gutter="10">
					        <u-col span="6">
					            <view class="left blod">
									周润发
								</view>
					        </u-col>
					        <u-col span="6">
					            <view class="right blod" :class="allNum >= 0 ? 'numV':'numD'">
									￥{{allNum}}
								</view>
					        </u-col>
					    </u-row>
				</view>
				<view class="item">
					<u-row
						justify="space-between"
						customStyle="width: 95%;margin:auto;"
						gutter="10">
					        <u-col span="4">
					            <view class="left">
									胜场：<text class="numV">150</text>
								</view>
					        </u-col>
							<u-col span="4">
							    <view class="left">
									负场：<text class="numD">88</text>
								</view>
							</u-col>
					        <u-col span="4">
					            <view class="right">
									比例：<text class="numV">100</text>%
								</view>
					        </u-col>
					    </u-row>
				</view>
			</view>
		</view>
		<view class="contentBox">
			<view class="item" v-for="(i,index) in userList" :key="index">
				<view class="top">
					<u-row
						justify="space-between"
						customStyle="width: 95%;margin:0 auto 20rpx auto;"
						gutter="10">
					        <u-col span="1">
					            <view class="left">
									<image class="logo" :src="i.num >= 0 ? '/static/V.png':'/static/D.png'"></image>
								</view>
					        </u-col>
							<u-col span="6">
							    <view class="left">
									2025-01-05 10:24
								</view>
							</u-col>
					        <u-col span="5">
					            <view class="right blod" :class="i.num >= 0 ? 'numV':'numD'">
									￥{{i.num}}
								</view>
					        </u-col>
					    </u-row>
				</view>
				<view class="bottm">
					与DevTools failed to load SourceMap: Could not load content for http://127.0.0.1:27440/.sourcemap/mp-weixin/uni_modules/uview-ui/components/u-slider/u-slider.js.map: HTTP error: status code 403, net::ERR_HTTP_RESPONSE_CODE_FAILURE
				</view>
			</view>
			<u-loadmore 
			:status="status" 
			:loading-text="loadingText" 
			:loadmore-text="loadmoreText" 
			:nomore-text="nomoreText" />
		</view>
	</view>
</template>

<script>
	
	export default {
		data() {
			return {
				titleWarning:'简易记账仅提供记录，禁止赌博或其它非法行为',
				userList:[
					{
						id:1,
						url:'/static/logo.png',
						username:'周XXX1',
						num:50
					},
					{
						id:2,
						url:'/static/logo.png',
						username:'周',
						num:0
					},
					{
						id:3,
						url:'/static/logo.png',
						username:'周',
						num:-50
					},
					{
						id:4,
						url:'/static/logo.png',
						username:'周',
						num:50
					},
					{
						id:5,
						url:'/static/logo.png',
						username:'周',
						num:50
					},
					{
						id:6,
						url:'/static/logo.png',
						username:'周',
						num:50
					},
					{
						id:7,
						url:'/static/logo.png',
						username:'周',
						num:50
					},
				],
				allNum:-1,
				payCha:25,
				status: 'loadmore',
				loadingText: '努力加载中',
				loadmoreText: '轻轻上拉',
				nomoreText: '实在没有了',
				list: 15,
				page: 0
			}
		},
		
		onReady() {
		},
		onShow() {
		},
		methods: {
			
		},
		onReachBottom() {
			if(this.page >= 3) return ;
			this.status = 'loading';
			this.page = ++ this.page;
			setTimeout(() => {
				this.userList.push({
						id:7,
						url:'/static/logo.png',
						username:'周xxxx',
						num:99999
					})
				if(this.page >= 3) this.status = 'nomore';
				else this.status = 'loading';
			}, 2000)
		}
	}
</script>

<style lang="scss" scoped>
	.historyContent{
		.headBox{
			width: 100%;
			height: 237rpx;
			z-index: 9;
			display: flex;
			align-items: center;
			.img{
				width: 20%;
				.logo{
					height: 150rpx;
					width: 150rpx;
					border-radius: 50%;
				}
			}
			.messageBox{
				width: 100%;
				display: flex;
				flex-direction: column;
				.item{
					.left{
						
					}
					.right{
						text-align: right;
					}
				}
			}
		}
		.contentBox{
			width: 100%;
			background-color: #f4f4f5;
			.logo{
				height: 60rpx;
				width: 60rpx;
			}
			.item{
				background-color: #fff;
				display: flex;
				flex-direction: column;
				margin-bottom: 20rpx;
				padding: 5rpx;
				.right{
					text-align: right;
				}
				.bottm{
					width: 95%;
					margin:0 auto 20rpx auto;
				}
			}
		}
		.numV{
			color: #fa3534;
		}
		.numD{
			color: #19be6b;
		}
		.blod{
			font-size: 36rpx;
			font-weight: 600;
		}
	}
</style>